# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-pygraphviz
_pkgname=pygraphviz
pkgver=1.5
pkgrel=1
epoch=1
pkgdesc='Python interface to the Graphviz graph layout and visualization package.'
arch=('x86_64' 'aarch64')
url='https://pypi.org/project/pygraphviz/#files'
license=('LGPL')
depends=('python2' 'graphviz')
makedepends=('python2-setuptools' 'python2-pip' 'python2-wheel' 'graphviz')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.zip")
sha512sums=('6d3df6642a7e23ecb6b687761480b80a3ee5886508ef50b81697041425be7d09d623bf46990c5cea3ef36817a28d9e5c2905eb32267296f55524fdedb2199ea2')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --prefix=/usr --root="$pkgdir" -O1 --skip-build

  #mv "$pkgdir/usr/share/doc/$_pkgname-$pkgver" \
  #  "$pkgdir/usr/share/${pkgname[0]}"
}

